#ifndef _DVB_TS_DB_H
#define _DVB_TS_DB_H

typedef struct TSData
{
	struct TSData*		next;
	unsigned short		netId;
	unsigned short		tsId;
	dvb_tuner_t			tunerParams;	
	SECTIONDB*			pat;
	SECTIONDB*			pmt;
	SECTIONDB*			sdt;
	SECTIONDB*		MGT;	
	SECTIONDB*		VCT;
	PSECTIONDB		EIT[4*7];
	PSECTIONDB		ETT[4*7];

}TSDATA,*PTSDATA;

extern TSDATA *DVBTSDBGetTSHead(void);

extern TSDATA *DVBTSDBCreateTS(unsigned short netId, unsigned short tsId);

extern TSDATA *DVBTSDBFindTSByFrequency(unsigned int freq);

extern TSDATA *DVBTSDBSearchTS(unsigned short netId, unsigned short tsId, unsigned int freq);

extern SECTIONDB *DVBTSDBGetNITDB(void);

extern SECTIONDB *DVBTSDBGetBATDB(void);

extern int DVBTSDBInit();

extern int DVBTSDBDeinit();

#endif
